Beispiel #1
0
        public async Task AddApplicationLoginAsync(ApplicationLogin applicationLogin)
        {
            var id = Guid.NewGuid().ToString("N");;

            applicationLogin.Id = id;

            using var context = new MedeccContext();
            await context.AddAsync(applicationLogin);

            await context.SaveChangesAsync();
        }
        public async Task <Physician> AddPhysicianAsync(Physician physician)
        {
            using var context = new MedeccContext();

            physician.Id = Guid.NewGuid().ToString("N");;

            await context.AddAsync(physician);

            await context.SaveChangesAsync();

            return(physician);
        }
Beispiel #3
0
        public async Task <string> AddMedia(Media media)
        {
            using var context = new MedeccContext();

            var id = Guid.NewGuid().ToString("N");;

            media.Id = id;
            await context.AddAsync(media);

            await context.SaveChangesAsync();

            return(id);
        }
Beispiel #4
0
        public async Task <string> AddMessage(Message message)
        {
            message.Id = Guid.NewGuid().ToString("N");;

            if (message.Stats != null)
            {
                message.Stats.Id = Guid.NewGuid().ToString("N");;
            }

            using var context = new MedeccContext();

            await context.AddAsync(message);

            await context.SaveChangesAsync();

            return(message.Id);
        }