public Photo GetPhotoEntity(BioService.Photo proto) { if (proto == null) return null; Photo entity = new Photo(); entity.Id = proto.Id; entity.Size_Type = (byte)proto.SizeType; entity.Origin_Type = (byte)proto.OriginType; entity.Image_Pathway = proto.FileLocation; entity.Fir_Pathway = proto.FirLocation; entity.Person_Id = proto.Personid; return entity; }
public BioService.Photo GetPhotoProto(Photo entity) { if (entity == null) return null; BioService.Photo proto = new BioService.Photo(); proto.Id = entity.Id; if (entity.Size_Type != null) proto.SizeType = (BioService.PhotoSizeType)entity.Size_Type; if (entity.Origin_Type != null) proto.OriginType = (BioService.PhotoOriginType)entity.Origin_Type; proto.FileLocation = entity.Image_Pathway; proto.FirLocation = entity.Fir_Pathway; if (entity.Person_Id.HasValue) proto.Personid = entity.Person_Id.Value; return proto; }