public static ProfileObject Create(string id, string name, string location,
                                           ProfileGender gender, DateTime birthDay, string occupation, string aboutText, string profileImage)
        {
            var o = new ProfileDbRecord
            {
                ID           = id,
                Name         = name,
                Location     = location,
                Gender       = gender,
                BirthDay     = birthDay,
                AboutText    = aboutText,
                Occupation   = occupation,
                ProfileImage = profileImage
            };

            return(new ProfileObject(o));
        }
Exemple #2
0
 private static string add(EventProjectDbContext c, ProfileDbRecord profile) //unikaalse ID genereerimine
 {
     profile.ID = Guid.NewGuid().ToString();
     c.Profiles.Add(profile); //lisab andmebaasi
     return(profile.ID);
 }