I am trying to insert Guid into my Asp.net project as a unique identifier. We determined the column length of table 16. When I insert the data, I get an exception: Data is too long - but when I increase the length of the column, it changes to byte array for guid must be exactly 16 bytes long .
I tried adding data through NHibernate. MySQL database server, column data type - :- BINARY , and length - :- 16
public class Myapp public Guid Id { get; set; }
We write code to receive data from the Cs page:
Myapp.Id =Guid.NewGuid();
How can i solve this?
source share